
<?php
	include("Connect/connection.php")
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Home</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/coin-slider.css" />
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/cufon-georgia.js"></script>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/coin-slider.min.js"></script>
<style>
	.ListCompany{
		margin-top:10px;
		width:920px;
		height:300px;
	}
	.product{
		margin-top:10px;
		width:920px;
		height:300px;
	}
	.news{
		width:920px;
		height:300px;
	}
	.company{
		width:296px;
		margin-right:6px;
		float:left;
		height:300px;
		border:1px solid #666;
		text-align:center
	}
	.image{
		height:250px;
		padding:2px
		}
	.name{
		margin-top:0px;
		line-height:30px;
		height:40px;
		font:Arial, Helvetica, sans-serif;
		font-size:24px;
		line-height:40px;
		padding-left:10px;
	}
	.name span {
		font: bold 330%/100% "Lucida Grande";
	  position: relative;
	  color: #464646;
	  background: url(gradient.png) repeat-x;
	  display: block;
	  width: 100%;
	  height: 31px;
	  margin-left:auto;
	  	  margin-right:auto;
	}
	.newspart1{
		height:300px;
		width:450px;
		border:1px solid #666;
		float:left;
	}
	
	.newspart2{
		height:300px;
		width:450px;
		border:1px solid #666;
		margin-left:455px;
	}
	.newsWrapRow{
		width:450px;
		height:50px;
	}
	.pic{
		width:50px;
		height:50px;
		float:left;
		}
	.title{
		width:390px;
		margin-left:55px;
		height:50px;
		line-height:50px;
		font:Arial, Helvetica, sans-serif;
		font-size:16px;
		text-decoration:none;
		margin-top:5px;
			}
</style>
</head>

<body>
<div class="main">
  <div class="header">
    <div class="header_resize">
      <div class="menu_nav">
        <ul>
          <li class="active"><a href="Home.php"><span>Home Page</span></a></li>
          <li><a href="news.php"><span>News</span></a></li>
          <li><a href="cars.php"><span>Cars</span></a></li>
          <li><a href="companies.php"><span>Provider</span></a></li>
          <li><a href="contactus.php"><span>Contact Us</span></a></li>
        </ul>
      </div>
      <div class="logo">
        <h1><a href="index.html">A<span>uto</span>S<span>hop</span></a></h1>
      </div>
      <div class="clr"></div>
      <div class="slider">
        <div id="coin-slider"> <a href="#"><img src="car/1.jpg" width="960" height="360" alt="" /><span>Aliquam fermentum arcu et velit fringillaonec ut felis ipsum. Maecenas lacinia orci cursuslacus sodales in posuere risus gravida. Lorem ipsum dolor sit amet, consectetng ipsum, in euismod velit fringilla vitae.</span></a> <a href="#"><img src="car/2.jpg" width="960" height="360" alt="" /><span>Tasellus ornare adipiscing ipsum, in euismod velit fringilla vitae. Aliquam fermentum arcu et velit fringilla vitae consequat lectus tempus. Donec at ante nec sem bibendum porttitor. Mauris eu accumsan justo. Suspendisse lacus ante.</span></a> <a href="#"><img src="car/3.jpg" width="960" height="360" alt="" /><span>Lorem ipsum dolor sit amet, consectetng ipsum, in euismod velit fringilla vitae. Aliquam fermentum arcu et velit fringillaonec ut felis ipsum. Maecenas lacinia orci cursuslacus sodales in posuere risus gravida.</span></a> </div>
        <div class="clr"></div>
      </div>
      <div class="clr"></div>
    </div>
  </div>
  <div class="content">
    <div class="content_resize">
    	<div class="news">
        	<div class="newspart1">
            	<?php 
                $sql="Select * from news order by NewsID desc limit 5";
                $re=mysql_query($sql);
                while($rs=mysql_fetch_array($re)){
                    $image=$rs['Image'];
                    $title=$rs['Title'];
                    $idNews=$rs['NewsID'];
            ?>
            <div class="newsWrapRow">
                <div class="pic">
                    <img src="images/<?=$image;?>" title="image" style="width:50px;height:50px"/>
                </div>
                <div class="title">
                <a style="text-decoration:none" href="newsdetail.php?id=<?=$idNews?>"><?=$title?></a>
                </div>
             </div>
            <?php
            }
        	?>
            </div>
        	<div class="newspart2">
            <?php 
                $sql="Select * from cars order by CarID desc limit 5";
                $re=mysql_query($sql);
                while($rs=mysql_fetch_array($re)){
                    $image=$rs['Image'];
                    $title=$rs['Name'];
                    $carId=$rs['CarID'];
            ?>
            <div class="newsWrapRow">
                <div class="pic">
                    <img src="images/<?=$image;?>" title="image" style="width:50px;height:50px"/>
                </div>
                <div class="title">
                <a style="text-decoration:none" href="carsdetail.php?id=<?=$carId?>"><?=$title?></a>
                </div>
             </div>
            <?php
            }
        	?>
            
            </div>
        </div>
    
    	<div class="product">
        	<?php 
                $sql="Select * from cars order by CarID desc limit 3";
                $re=mysql_query($sql);
                while($rs=mysql_fetch_array($re)){
                    $image=$rs['Image'];
                    $name=$rs['Name'];
                    $carID = $rs['CarID'];
            ?>
                <div class="company">
                    <div class="image"><img src="images/<?=$image;?>" title="image" style="width:290px;height:250px"/></div>
                    <div class="name">
                    <a style="text-decoration:none" href="carsdetail.php?id=<?=$carID?>"><?=$name?></a>
                    </div>
                </div>
            <?php
            }
        	?>
        </div>
    	<div class="ListCompany">
			<?php 
                $sql="Select * from Company order by ComID desc limit 3";
                $re=mysql_query($sql);
                while($rs=mysql_fetch_array($re)){
                    $logo=$rs['Logo'];
                    $name=$rs['Name'];
                    $companyID = $rs['ComID'];
            ?>
                <div class="company">
                    <div class="image"><img src="images/<?=$logo;?>" title="image" style="width:290px;height:250px"/></div>
                    <div class="name">
                     <a style="text-decoration:none" href="companydetail.php?id=<?=$companyID?>"><?=$name?></a>
                    </div>
                </div>
            <?php
            }
        	?>
        </div>
    <div class="clr"></div>
    </div>
  </div>
  <div class="fbg">
    <div class="fbg_resize">
      <div class="clr"></div>
    </div>
  </div>
  <div class="footer">
    <div class="footer_resize">
      <p class="lf">&nbsp;</p>
      <div style="clear:both;"></div>
    </div>
  </div>
</div>
</body>
</html>